import request from '@/utils/request'

export function getArticleList(pageNum, pageSize) {
  return request({
    url: `http://localhost:7000/bbs/bbs/getArticleLists/${pageNum}/${pageSize}`,
    method: 'post',
  })
}

export function getLikeList(pageNum, pageSize) {
  return request({
    url: `http://localhost:7000/bbs/bbs/getLikeList/${pageNum}/${pageSize}`,
    method: 'post',
  })
}

export function deleteArticle(article) {
  return request({
    url: `http://localhost:7000/bbs/bbs/deleteArticle/`,
    method: 'post',
    data: article,
  })
}

export function checkArticle(articleStatus, article) {
  return request({
    url: `http://localhost:7000/bbs/bbs/checkArticle/${articleStatus}`,
    method: 'post',
    data: article,
  })
}

export function getDocumentList() {
  return request({
    url: `http://localhost:7000/bbs/bbs/getDocumentList/`,
    method: 'post',
  })
}

export function checkFile(fileStatus, tbDocument) {
  return request({
    url: `http://localhost:7000/bbs/bbs/checkFile/${fileStatus}`,
    method: 'post',
    data: tbDocument,
  })
}

export function getCollectList(pageNum, pageSize) {
  return request({
    url: `http://localhost:7000/bbs/bbs/getCollectList/${pageNum}/${pageSize}`,
    method: 'post',
  })
}

export function getAttentionList(pageNum, pageSize) {
  return request({
    url: `http://localhost:7000/bbs/bbs/getAttentionList/${pageNum}/${pageSize}`,
    method: 'post',
  })
}

export function getUnreviewedCommentList(pageNum, pageSize) {
  return request({
    url: `http://localhost:7000/bbs/bbs/getUnreviewedCommentList/${pageNum}/${pageSize}`,
    method: 'post',
  })
}

export function checkComment(checkStatus, comment) {
  return request({
    url: `http://localhost:7000/bbs/bbs/checkComment/${checkStatus}/`,
    method: 'post',
    data: comment,
  })
}
